package com.system.service;

import com.system.dao.AdministratorMapper;
import com.system.pojo.Administrator;

import java.util.List;
import java.util.Map;

/**
 * Created by 陈文杰 on 2022/6/8 20:39
 */
public class AdministratorServiceImpl implements AdministratorService{

    private AdministratorMapper administratorMapper;

    public void setAdministratorMapper(AdministratorMapper administratorMapper) {
        this.administratorMapper = administratorMapper;
    }

    @Override
    public List<Administrator> queryAdministratorAll() {
        return administratorMapper.queryAdministratorAll();
    }

    @Override
    public Administrator queryAdministratorById(int adminId) {
        return administratorMapper.queryAdministratorById(adminId);
    }

    @Override
    public Administrator queryAdministratorByName(String adminName) {
        return administratorMapper.queryAdministratorByName(adminName);
    }

    @Override
    public int updateAdministrator(Map<String, Object> map) {
        return administratorMapper.updateAdministrator(map);
    }

    @Override
    public int deleteAdministrator(int adminId) {
        return administratorMapper.deleteAdministrator(adminId);
    }

    @Override
    public int addAdministrator(Administrator administrator) {
        return administratorMapper.addAdministrator(administrator);
    }
}
